#pragma once

#include <boost/spirit/include/qi_symbols.hpp>

#include "Enums.hpp"




namespace Engine
{
	namespace Ui
	{
		struct ui_attribute_symbols
			: boost::spirit::qi::symbols<wchar_t, Attributes::Type>
		{
			typedef Attributes::Type   Type;

			ui_attribute_symbols()
			{
				add
					(L"background-color",    Attributes::BackgroundColor)
					(L"background-image",    Attributes::BackgroundGlyph)
					(L"background-image-l",  Attributes::BackgroundGlyphLeft)
					(L"background-image-tl", Attributes::BackgroundGlyphTopLeft)
					(L"background-image-t",  Attributes::BackgroundGlyphTop)
					(L"background-image-tr", Attributes::BackgroundGlyphTopRight)
					(L"background-image-r",  Attributes::BackgroundGlyphRight)
					(L"background-image-br", Attributes::BackgroundGlyphBottomRight)
					(L"background-image-b",  Attributes::BackgroundGlyphBottom)
					(L"background-image-bl", Attributes::BackgroundGlyphBottomLeft)
					(L"foreground-color",    Attributes::ForegroundColor)
					(L"foreground-image",    Attributes::ForegroundGlyph)
					(L"foreground-image-l",  Attributes::ForegroundGlyphLeft)
					(L"foreground-image-tl", Attributes::ForegroundGlyphTopLeft)
					(L"foreground-image-t",  Attributes::ForegroundGlyphTop)
					(L"foreground-image-tr", Attributes::ForegroundGlyphTopRight)
					(L"foreground-image-r",  Attributes::ForegroundGlyphRight)
					(L"foreground-image-br", Attributes::ForegroundGlyphBottomRight)
					(L"foreground-image-b",  Attributes::ForegroundGlyphBottom)
					(L"foreground-image-bl", Attributes::ForegroundGlyphBottomLeft)
					(L"font",                Attributes::Font)
					(L"font-color",          Attributes::FontColor)
					(L"font-style",          Attributes::FontStyle)
					(L"font-size",           Attributes::FontSize)
					(L"font-weight",         Attributes::FontWeight)
					(L"font-outline",        Attributes::FontOutline)
					(L"min-width",           Attributes::MinWidth)
					(L"max-width",           Attributes::MaxWidth)
					(L"min-height",          Attributes::MinHeight)
					(L"max-height",          Attributes::MaxHeight)
					(L"resizing",            Attributes::Resizing)
					;
			}
		};
		///////////////////////////////////////////////////////////////////////////////////////////

		struct ui_class_symbols : boost::spirit::qi::symbols<wchar_t, Widgets::Type>
		{
			typedef Widgets::Type   Type;

			ui_class_symbols()
			{
				add
					(L"text",            Widgets::Text)
					(L"console",         Widgets::Console)
					(L"desktop",         Widgets::Desktop)
					(L"abstract-button", Widgets::AbstractButton)
					(L"push-button",     Widgets::PushButton)
					(L"frame",           Widgets::Frame)
					(L"line-edit",       Widgets::LineEdit)
					(L"progress-bar",    Widgets::ProgressBar)
					(L"window",          Widgets::Window)
					(L"dialog",          Widgets::Dialog)
				;
			}
		};
		///////////////////////////////////////////////////////////////////////////////////////////

		struct ui_state_symbols : boost::spirit::qi::symbols<wchar_t, WidgetState::Type>
		{
			typedef WidgetState::Type   Type;

			ui_state_symbols()
			{
				add
					(L"hovered", WidgetState::Hovered)
					(L"active",  WidgetState::Active)
					;
			}
		};
		///////////////////////////////////////////////////////////////////////////////////////////
	}
	///////////////////////////////////////////////////////////////////////////////////////////////
}
///////////////////////////////////////////////////////////////////////////////////////////////////
